<?php ob_start(); ?>
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/components.css">
<link rel="stylesheet" href="/css/edit.css">

<div class="edit-bookmark-container">
    <h2>编辑书签</h2>
    <form action="index.php?action=edit_bookmark&id=<?php echo $bookmark['id']; ?>" method="post" class="edit-form">
        <input type="text" name="title" value="<?php echo htmlspecialchars($bookmark['title']); ?>" required>
        <input type="url" name="url" value="<?php echo htmlspecialchars($bookmark['url']); ?>" required>
        <input type="text" name="category" value="<?php echo htmlspecialchars($bookmark['category']); ?>">
        <textarea name="description"><?php echo htmlspecialchars($bookmark['description']); ?></textarea>
        <input type="url" name="imgurl" value="<?php echo htmlspecialchars($bookmark['imgurl']); ?>" placeholder="Image URL">
        <button type="submit">保存修改</button>
    </form>
</div>

<?php $content = ob_get_clean(); ?>
<?php include 'layout.php'; ?>
